h4.card-title General
dl
  dt Time
  dd
    +clickableValue('starttime', session.firstPacket)
    strong -&nbsp;
    +clickableValue('stoptime', session.lastPacket)

  dt Id
  dd
    +clickableValue('id', Db.sid2Id(session.id))

  +arrayList(session, "rootId", "Root Id", "rootId")

  if (session.network && session.network.community_id)
    +arrayList(session.network, "community_id", "Community Id", "communityId")

  dt
    +clickableLabel('node', 'Node')
  dd
    +clickableValue('node', session.node)
    if (session.srcNode)
      +clickableValue('srcNode', session.srcNode)

  +arrayList(session, "protocol", "Protocols", "protocols")

  if (session.ethertype !== undefined)
    dt
      +clickableLabel('ethertype', 'Ethertype')
    dd
      +clickableValue('ethertype', session.ethertype)

  dt
    +clickableLabel('ip.protocol', 'IP Protocol')
  dd
    +clickableValue('ip.protocol', session.ipProtocol)

  +arrayList(session, "user", "Users", "user")

  +arrayList(session, "asset", "Assets", "asset")

  if (session.source.bytes || session.destination.bytes)
    dt
      b-dropdown.clickable-label(text="Src", size="sm", variant="default")
        +clickableLabelBody('packets.src', 'Src Packets')
        +clickableFieldActions('packets.src', false)
        b-dropdown-divider
        +clickableLabelBody('bytes.src', 'Src Bytes')
        +clickableFieldActions('bytes.src', false)
        b-dropdown-divider
        +clickableLabelBody('databytes.src', 'Src Databytes')
        +clickableFieldActions('databytes.src', false)
    dd
      span.no-wrap
        strong.ms-1 Packets
        +clickableValue('packets.src', session.source.packets)
      span.no-wrap
        strong.ms-1 Bytes
        +clickableValue('bytes.src', session.source.bytes)
      span.no-wrap
        strong.ms-1 Databytes
        +clickableValue('databytes.src', session.client.bytes)

    dt
      b-dropdown.clickable-label(text="Dst", size="sm", variant="default")
        +clickableLabelBody('packets.dst', 'Dst Packets')
        +clickableFieldActions('packets.dst', false)
        b-dropdown-divider
        +clickableLabelBody('bytes.dst', 'Dst Bytes')
        +clickableFieldActions('bytes.dst', false)
        b-dropdown-divider
        +clickableLabelBody('databytes.dst', 'Dst DataBytes')
        +clickableFieldActions('databytes.dst', false)
    dd
      span.no-wrap
        strong.ms-1 Packets
        +clickableValue('packets.dst', session.destination.packets)
      span.no-wrap
        strong.ms-1 Bytes
        +clickableValue('bytes.dst', session.destination.bytes)
      span.no-wrap
        strong.ms-1 Databytes
        +clickableValue('databytes.dst', session.server.bytes)

  if (session.source.mac)
    dt
      b-dropdown.clickable-label(text="Src Ethernet", size="sm", variant="default")
        +clickableLabelBody('mac.src', 'Src Mac')
        +clickableFieldActions('mac.src', false)
        b-dropdown-divider
        +clickableLabelBody('oui.src', 'Src OUI')
        +clickableFieldActions('oui.src', false)
    dd
      strong.ms-1 Mac
      +arrayPrint(session.source, "mac", "mac.src")

      if (session.srcOui)
        strong.ms-1 OUI
        +arrayPrint(session, "srcOui", "oui.src")

  if (session.destination.mac)
    dt
      b-dropdown.clickable-label(text="Dst Ethernet", size="sm", variant="default")
        +clickableLabelBody('mac.dst', 'Dst Mac')
        +clickableFieldActions('mac.dst', false)
        b-dropdown-divider
        +clickableLabelBody('out.dst', 'Dst OUI')
        +clickableFieldActions('oui.dst', false)
    dd
      strong.ms-1 Mac
      +arrayPrint(session.destination, "mac", "mac.dst")

      if (session.dstOui)
        strong.ms-1 OUI
        +arrayPrint(session, "dstOui", "oui.dst")

  if (session.dot1q != undefined || session.dot1ad != undefined || (session.network && session.network.vlan !== undefined))
    dt
      b-dropdown.clickable-label(text="VLan", size="sm", variant="default")
        if (session.network && session.network.vlan !== undefined)
          +clickableLabelBody('vlan', 'VLan')
          +clickableFieldActions('vlan', false)
          b-dropdown-divider
        if (session.dot1q)
          +clickableLabelBody('vlan.dot1q', 'VLan dot1q')
          +clickableFieldActions('vlan.dot1q', false)
          b-dropdown-divider
        if (session.dot1ad)
          +clickableLabelBody('vlan.dot1ad', 'VLan dot1ad')
          +clickableFieldActions('vlan.dot1ad', false)

    dd
      if (session.network && session.network.vlan !== undefined)
        +arrayPrint(session.network.vlan, "id", "vlan")

      if (session.dot1q)
        strong.ml-1 dot1q
        +arrayPrint(session.dot1q, "id", "vlan.dot1q")

      if (session.dot1ad)
        strong.ml-1 dot1ad
        +arrayPrint(session.dot1ad, "id", "vlan.dot1ad")

  +arrayList(session, "vni", "VNI", "vni")

  if (session.srcOuterMac || session.srcOuterIp )
    dt
      b-dropdown.clickable-label(text="Src Outer Layer", size="sm", variant="default")
        if (session.srcOuterMac)
          +clickableLabelBody('outermac.src', 'Outer Src Mac')
          +clickableFieldActions('outermac.src', false)
          b-dropdown-divider
        if (session.srcOuterIp)
          +clickableLabelBody('outerip.src', 'Outer Src IP')
          +clickableFieldActions('outerip.src', false)
          b-dropdown-divider
        if (session.srcOuterOui)
          +clickableLabelBody('outeroui.src', 'Outer Src OUI')
          +clickableFieldActions('outeroui.src', false)
          b-dropdown-divider
    dd
      if (session.srcOuterMac)
        strong.ms-1 Mac
        +arrayPrint(session, "srcOuterMac", "outermac.src")
      if (session.srcOuterOui)
        strong.ms-1 Oui
        +arrayPrint(session, "srcOuterOui", "outeroui.src")
      if (session.srcOuterIp)
        strong.ms-1 IP
        +arrayPrint(session, "srcOuterIp", "outerip.src")

  if (session.dstOuterMac || session.dstOuterIp )
    dt
      b-dropdown.clickable-label(text="Dst Outer Layer", size="sm", variant="default")
        if (session.dstOuterMac)
          +clickableLabelBody('outermac.dst', 'Outer Dst Mac')
          +clickableFieldActions('outeroui.dst', false)
          b-dropdown-divider
        if (session.dstOuterIp)
          +clickableLabelBody('outerip.dst', 'Outer Dst IP')
          +clickableFieldActions('outerip.dst', false)
          b-dropdown-divider
        if (session.dstOuterOui)
          +clickableLabelBody('outeroui.dst', 'Outer Dst OUI')
          +clickableFieldActions('outeroui.dst', false)
    dd
      if (session.dstOuterMac)
        strong.ms-1 Mac
        +arrayPrint(session, "dstOuterMac", "outermac.dst")
      if (session.dstOuterOui)
        strong.ms-1 Oui
        +arrayPrint(session, "dstOuterOui", "outeroui.dst")
      if (session.dstOuterIp)
        strong.ms-1 IP
        +arrayPrint(session, "dstOuterIp", "outerip.dst")

  dt
    b-dropdown.clickable-label(text="Src IP/Port", size="sm", variant="default")
      +clickableLabelBody('ip.src', 'Src IP')
      b-dropdown-item(@click="exportUnique('ip.src:port.src', 0)")
        | {{ $t('sessions.exportUnique', {name: "Src IP#{sep}Port"} ) }}
      b-dropdown-item(@click="exportUnique('ip.src:port.src', 1)")
        | {{ $t('sessions.exportUniqueCounts', {name: "Src IP#{sep}Port"} ) }}
      +clickableFieldActions('ip.src', false)
      b-dropdown-divider
      +clickableLabelBody('port.src', 'Src Port')
      +clickableFieldActions('port.src', false)
      b-dropdown-divider
      +clickableLabelBody('country.src', 'Src Country')
      +clickableFieldActions('country.src', false)
      b-dropdown-divider
      +clickableLabelBody('source.as.full', 'Src ASN')
      +clickableFieldActions('source.as.full', false)
      b-dropdown-divider
      +clickableLabelBody('rir.src', 'Src RIR')
      +clickableFieldActions('rir.src', false)

  dd
    +ipPrint(session, session.source.ip, session.source.port, session.source.geo.country_iso_code, session.source.as.full, session.srcRIR, "src", false, session.source.geo.region_iso_code, session.source.geo.city_name)

  dt
    b-dropdown.clickable-label(text="Dst IP/Port", size="sm", variant="default")
      +clickableLabelBody('ip.dst', 'Dst IP')
      b-dropdown-item(@click="exportUnique('ip.dst:port.dst', 0)")
        | {{ $t('sessions.exportUnique', {name: "Dst IP#{sep}Port"} ) }}
      b-dropdown-item(@click="exportUnique('ip.dst:port.dst', 1)")
        | {{ $t('sessions.exportUniqueCounts', {name: "Dst IP#{sep}Port"} ) }}
      +clickableFieldActions('ip.dst', false)
      b-dropdown-divider
      +clickableLabelBody('port.dst', 'Dst Port')
      +clickableFieldActions('port.dst', false)
      b-dropdown-divider
      +clickableLabelBody('country.dst', 'Dst Country')
      +clickableFieldActions('country.dst', false)
      b-dropdown-divider
      +clickableLabelBody('destination.as.full', 'Dst ASN')
      +clickableFieldActions('destination.as.full', false)
      b-dropdown-divider
      +clickableLabelBody('rir.dst', 'Dst RIR')
      +clickableFieldActions('rir.dst', false)

  dd
    +ipPrint(session, session.destination.ip, session.destination.port, session.destination.geo.country_iso_code, session.destination.as.full, session.dstRIR, "dst", false, session.destination.geo.region_iso_code, session.destination.geo.city_name)

  if (session.srcPayload8 || session.dstPayload8)
    dt
      b-dropdown.clickable-label(text="Payload8", size="sm", variant="default")
        +clickableLabelBody('payload8.src.hex', 'Src Payload8')
        b-dropdown-divider
        +clickableLabelBody('payload8.dst.hex', 'Dst Payload8')
        +clickableFieldActions('payload8.dst.hex', false)

    dd
      - function isprint(char) { return !( /[\x00-\x08\x0E-\x1F\x80-\xFF]/.test(char)); }
      - function printstr(str) { for (let char of str) { if (!isprint(char)) { char = '�'; } } return str; }
      if (session.srcPayload8)
        span.no-wrap
          strong.ms-1 Src
          - var srcPayload8a = Buffer.from(session.srcPayload8, "hex").toString();
          +clickableValue('payload8.src.hex', session.srcPayload8)
        | ( #{printstr(srcPayload8a)} )
      if (session.dstPayload8)
        span.no-wrap
          if (session.srcPayload8)
            strong.ms-1 Dst
          else
            strong Dst
          - var dstPayload8a = Buffer.from(session.dstPayload8, "hex").toString();
          +clickableValue('payload8.dst.hex', session.dstPayload8)
        | ( #{printstr(dstPayload8a)} )

  div.tag-list
    +arrayList(session, "tags", "Tags", "tags", '<div @click="addTags()" title="Add a new tag to this session" class="btn btn-xs btn-theme-secondary ms-1"><span class="fa fa-plus-circle"></span></div>')

  if (session.fileId && session.fileId.length > 0)
    +arrayList(session, "fileId", "Files", "file")

  if (session.huntId && session.huntId.length > 0)
    +arrayList(session, "huntId", "Hunt Ids", "huntId")
  if (session.huntName && session.huntName.length > 0)
    +arrayList(session, "huntName", "Hunt Names", "huntName")

  if (session.scrubby)
    dt
      +clickableLabel('scrubbed.by', 'Scrubbed')
    dd
      div.mt-1.mb-1
        | By Moloch user #{session.scrubby} at #{new Date(session.scrubat)}

  if (session.socks)
    dt
      b-dropdown.clickable-label(text="Socks Dst", size="sm", variant="default")
        +clickableLabelBody('ip.socks', 'Socks Dst')
        +clickableFieldActions('ip.socks', false)
        b-dropdown-divider
        +clickableLabelBody('port.socks', 'Socks Port')
        +clickableFieldActions('port.socks', false)
        b-dropdown-divider
        +clickableLabelBody('country.socks', 'Socks Country')
        +clickableFieldActions('country.socks', false)
        b-dropdown-divider
        +clickableLabelBody('asn.socks', 'Socks ASN')
        +clickableFieldActions('asn.socks', false)
        b-dropdown-divider
        +clickableLabelBody('rir.socks', 'Socks RIR')
        +clickableFieldActions('rir.socks', false)

    dd
      +ipPrint(session, session.socks.ip, session.socks.port, session.socks.GEO, session.socks.ASN, session.socks.RIR, "socks", false)

    dt
      b-dropdown.clickable-label(text="Socks Host", size="sm", variant="default")
        +clickableLabelBody('host.socks', 'Socks Host')
        +clickableFieldActions('host.socks', false)
        b-dropdown-divider
        +clickableLabelBody('port.socks', 'Socks Port')
        +clickableFieldActions('port.socks', false)

    dd
      +clickableValue('host.socks', session.socks.host)
      | :
      +clickableValue('port.socks', session.socks.port)

    if (session.socks.user)
      dt
        +clickableLabel('socks.user', 'Socks User')
      dd
        +clickableValue('socks.user', session.socks.user)

  if (session.greIp)
    +ipArrayList(session, "greIp", "GRE IPs", "gre.ip")

  if (session.tcp)
    +arrayList(session.tcp, "ja4l", "JA4l", "tcp.ja4l")
    +arrayList(session.tcp, "ja4ls", "JA4ls", "tcp.ja4ls")
    +arrayList(session.tcp, "ja4t", "JA4t", "tcp.ja4t")
    +arrayList(session.tcp, "ja4ts", "JA4ts", "tcp.ja4ts")

  if (session.tcpflags)
    dt
      b-dropdown.clickable-label(text="TCP Flags", size="sm", variant="default")
        +clickableLabelBody('tcpflags.syn', 'SYN')
        +clickableFieldActions('tcpflags.syn', false)
        b-dropdown-divider
        +clickableLabelBody('tcpflags.syn-ack', 'SYN-ACK')
        +clickableFieldActions('tcpflags.syn-ack', false)
        b-dropdown-divider
        +clickableLabelBody('tcpflags.ack', 'ACK')
        +clickableFieldActions('tcpflags.ack', false)
        b-dropdown-divider
        +clickableLabelBody('tcpflags.psh', 'PSH')
        +clickableFieldActions('tcpflags.psh', false)
        b-dropdown-divider
        +clickableLabelBody('tcpflags.rst', 'RST')
        +clickableFieldActions('tcpflags.rst', false)
        b-dropdown-divider
        +clickableLabelBody('tcpflags.fin', 'FIN')
        +clickableFieldActions('tcpflags.fin', false)
        b-dropdown-divider
        +clickableLabelBody('tcpflags.urg', 'URG')
        +clickableFieldActions('tcpflags.urg', false)
    dd
      span.no-wrap
        strong.ms-1 SYN
        +clickableValue('tcpflags.syn', session.tcpflags.syn)
      span.no-wrap
        strong.ms-1 SYN-ACK
        +clickableValue('tcpflags.syn-ack', session.tcpflags['syn-ack'])
      span.no-wrap
        strong.ms-1 ACK
        +clickableValue('tcpflags.ack', session.tcpflags.ack)
      span.no-wrap
        strong.ms-1 PSH
        +clickableValue('tcpflags.psh', session.tcpflags.psh)
      span.no-wrap
        strong.ms-1 RST
        +clickableValue('tcpflags.rst', session.tcpflags.rst)
      span.no-wrap
        strong.ms-1 FIN
        +clickableValue('tcpflags.fin', session.tcpflags.fin)
      span.no-wrap
        strong.ms-1 URG
        +clickableValue('tcpflags.urg', session.tcpflags.urg)

  if (session.tcpseq)
    dt
      b-dropdown.clickable-label(text="TCP Initial Seq", size="sm", variant="default")
        if (session.tcpseq.src !== undefined)
          +clickableLabelBody('tcpseq.src', 'TCP Seq Src')
          +clickableFieldActions('tcpseq.src', false)
        if (session.tcpseq.dst !== undefined)
          +clickableLabelBody('tcpseq.dst', 'TCP Seq Dst')
          +clickableFieldActions('tcpseq.dst', false)
    dd
      if (session.tcpseq.src !== undefined)
        strong.ms-1 Src
        +arrayPrint(session.tcpseq, "src", "tcpseq.src")
      if (session.tcpseq.dst !== undefined)
        strong.ms-1 Dst
        +arrayPrint(session.tcpseq, "dst", "tcpseq.dst")

  if (session.icmp)
    dt
      b-dropdown.clickable-label(text="ICMP", size="sm", variant="default")
        +clickableLabelBody('icmp.type', 'ICMP Type')
        +clickableFieldActions('icmp.type', false)
        b-dropdown-divider
        +clickableLabelBody('icmp.code', 'ICMP Code')
        +clickableFieldActions('icmp.code', false)
    dd
      strong.ms-1 Type
      +arrayPrint(session.icmp, "type", "icmp.type")
      strong.ms-1 Code
      +arrayPrint(session.icmp, "code", "icmp.code")

  if (session.srcDscp || session.dstDscp)
    dt
      b-dropdown.clickable-label(text="DSCP", size="sm", variant="default")
        if (session.srcDscp)
          +clickableLabelBody('dscp.src', 'Src DSCP')
          +clickableFieldActions('dscp.src', false)
        if (session.dstDscp)
          +clickableLabelBody('dscp.dst', 'Dst DSCP')
          +clickableFieldActions('dscp.dst', false)
    dd
      if (session.srcDscp)
        strong.ms-1 Src
        +arrayPrint(session, "srcDscp", "dscp.src")
      if (session.dstDscp)
        strong.ms-1 Dst
        +arrayPrint(session, "dstDscp", "dscp.dst")

  if (session.srcTTL || session.dstTTL)
    dt
      b-dropdown.clickable-label(text="IP TTL", size="sm", variant="default")
        if (session.srcTTL)
          +clickableLabelBody('ttl.src', 'Src TTL')
          +clickableFieldActions('ttl.src', false)
        if (session.srcTTL && session.dstTTL)
          b-dropdown-divider
        if (session.dstTTL)
          +clickableLabelBody('ttl.dst', 'Dst TTL')
          +clickableFieldActions('ttl.dst', false)
    dd
      if (session.srcTTL)
        strong.ms-1 Src
        +arrayPrint(session, "srcTTL", "ttl.src")
      if (session.dstTTL)
        strong.ms-1 Dst
        +arrayPrint(session, "dstTTL", "ttl.dst")
